﻿@model IEnumerable<Guline.HosterModels.Object.Group>
@{
    ViewBag.Title = "Group";
    Layout = "~/Views/Shared/_Layout_Admin.cshtml";

}

<span class="s_title_body_right">@ViewBag.Title</span>
<div class="">@Html.ActionLink("Add", "Create", "Group", new { @class = "btn_add" })</div>
<div class="clear-fix"></div>
<table id="example" class="display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>
                <p>ID</p>
            </th>
            <th>
                <p>Name</p>
            </th>
            <th>
                <p>MaxOrganizes</p>
            </th>
            <th>
                <p>Status</p>
            </th>
            @*<th>
                <p>Notes</p>
            </th>*@
            <th>
            </th>
        </tr>
    </thead>
    <tbody>

        @foreach (var m in Model)
        {
            <tr>
                <td class="td_center">
                    <div class="break_word">
                        @m.ID
                    </div>
                </td>
                <td>
                    <div class="break_word">
                        @m.Name
                    </div>
                </td>
                <td class="td_center">
                    @m.MaxOrganizes
                </td>
                <td class="td_center">
                    @if (m.Status == 0)
                    {
                        @Html.ActionLink("Disable", "editStatus", "Group", new { GroupID = m.ID }, new { @class = "dis", @title = "Click to Enable" })
                    }
                    else
                    {
                        @Html.ActionLink("Enable", "editStatus", "Group", new { GroupID = m.ID }, new { @class = "ena", @title = "Click to Disable" })
                    }
                </td>
                @*<td>
                    <div class="break_word">@m.Notes</div>

                </td>*@

                <td class="td_center">

                    @Html.ActionLink("Edit", "Edit", "Group", new { ID = m.ID }, null)
                    <div class="clear-fix"></div>
                    <a href="/Group/Delete?GroupID=@m.ID" onclick="return confirm('Are you sure you want to delete this @ViewBag.Title?\nID: @m.ID\nName: @m.Name')">Delete</a>
                </td>

            </tr>
        }
    <tbody>
</table>
